#include "../lib/string_rld.h"

string stringNCopy (string pResult, const string pSource, int cntChar){
    
    initString(pResult, cntChar);
    strncpy (pResult, pSource, cntChar);
    
    return pResult;
    
}

void initString(string pString, int pLength){
    int x = 0;
    for (x = 0; x <= pLength; x++) pString [x] = '\0';
}

string append(string to, char c){
    
  int last = strlen(to);
  to[last] = c;
  to[last + 1] = '\0';
  return to;
  
}
